"""
数据类型 枚举类
"""

from utils.enum_utils.base import StringEnum


class ContentType(StringEnum):
    """ 内容编码类型 枚举类 """

    ANY = "*/*", "任意类型"

    # 文本相关
    CSS = "text/css", "CSS"
    RTF = "text/rtf", "RTF"
    HTML = "text/html", "HTML"
    TEXT = "text/plain", "纯文本"

    # 图片相关
    ICO = "image/ico", "ICO图标"
    GIF = "image/gif", "GIF图片"
    PNG = "image/png", "PNG图片"
    JPG = "image/jpeg", "JPG图片"
    TIF = "image/tiff", "TIF图片"

    # 音频相关
    MP3 = "audio/mp3", "MP3"
    WAV = "audio/wav", "WAV"

    # 视频相关
    MPG = "video/mpg", "MPG"
    MP4 = "video/mpeg4", "MP4"  # noqa
    WMV = "video/x-ms-wmv", "WMV"
    RMVB = "application/vnd.rn-realmedia-vbr", "RMVB"  # noqa

    # 表单相关
    FORM_DATA = "multipart/form-data", "表单"

    # Office相关
    PDF = "application/pdf", "PDF"
    WORD = "application/msword", "Word"  # noqa
    EXCEL = "application/vnd.ms-excel", "Excel"
    PPT = "application/vnd.ms-powerpoint", "PPT"

    # 文件相关
    XML = "application/xml", "XML"
    JSON = "application/json", "Json"
    ZIP = "application/zip", "ZIP压缩包"
    TAR = "application/x-tar", "TAR压缩包"
    TORRENT = "application/x-torrent", "种子"
    SSM = "application/streamingmedia", "流媒体"  # noqa
    JAVASCRIPT = "application/javascript", "JS"
    EXE = "application/x-msdownload", "Windows可执行文件"  # noqa
    BINARY = "application/octet-stream", "（不确定文件类型的）二进制"
    URLENCODED = "application/x-www-form-urlencoded", "URLENCODED"


class EmailContentType(StringEnum):
    """ 邮件 ContentType 枚举类（简化） """

    HTML = "html", "HTML"
    PLAIN = "plain", "纯文本"
